<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css" />
		<link rel="stylesheet" type="text/css" href="/css/zhuce.css" />
		<script src="/js/jquery-3.4.1.min.js" type="text/javascript" charset="UTF-8"></script>
		<script src="/js/bootstrap.min.js" type="text/javascript" charset="UTF-8"></script>
		<title>JSP Page</title>
		<script>
            $(function () {
                $('#sendbtn').click(function () {
                    var phone = $("#phone").val();
                    if(phone ==""){
                        alert("手机号不能为空");
                        return;
                    }
                    isStop = setInterval("time()",1000);
                    $('#sendbtn').attr("disabled",true);
                    $.getJSON("/User/sendSMS.do",{phone:phone,},function (result) {
                        if(result.msg == "ok"){
                            alert("验证码发送成功");
                        }else{
                            alert(result.msg);
                        }
                    })
                });
                $("#loginbtn").click(function () {
                    var code = $("#code").val();
                    var account =  $("#account").val();
                    var password = $("#password").val();
                    var phone = $("#phone").val();
                    if(phone ==""){
                        alert("手机号不能为空");
                        return;
                    }
                    if(account==""){
                        alert("账号不能为空");
						return;
					}
                    if(password==""){
                        alert("密码不能为空");
                        return;
                    }
                    if(code==''){
                        alert("验证码不能为空");
                        return;
                    }

                    $.getJSON("/User/Phonelogin.do",{code:code,account:account,password:password,telephone:phone},function (result) {
                        if(result.msg =="ok"){
                            window.location.href="/jsp/loginSuccess.jsp";
                        }else{
                            alert("验证码错误");
                        }
                    });
                });
            });
            var sec = 30;
            var isStop = 0;
            function time() {
                sec--;
                if(sec==0){
                    $('#sendbtn').val("可以再次发送验证码")
                    $('#sendbtn').removeAttr("disabled");
                    sec = 30;
                    clearInterval(isStop);
                }else{
                    $('#sendbtn').val(sec+"S后可以重新发送")
                }
            }
		</script>
	</head>

	<body>
		<div class="container">
			<header class="head">
				<a href="#">
					<img class="img" src="/img/bihubihu.png" alt="bi乎注册" />
				</a>
				<div class="head-yi">
					<a href="#">机构帐号开通指南</a>
					<p class="p">
						已有帐号？
						<a href="signup.jsp" style="font-weight: 600;">登录</a>
					</p>
				</div>
			</header>
		</div>
		<div class="container">
			<section class="section">
				<div class="section-div1">
					<div class="div2">
						<img src="/img/orgSignBackground.f8c3132e.png" class="img01" />
					</div>
					<div class="div3">
						<img src="/img/orgLogo.856a3683.png" class="img02" />
						<div class="div4">
							<input type="text" id="account" name="account" value="" placeholder="请填写账号" />
							<hr />
							<input type="password" name="password" id="password" value="" placeholder="请填写密码" />
							<hr />
							<input type="text" name="phone" id="phone" value="" placeholder="请输入手机号">
							<input type="button" value="发送" id="sendbtn">
							<hr />
							<input type="text" name="code" id="code" value="" placeholder="验证码" />
							<hr />
							<div>
								<input type="button" value="注册" id="loginbtn">
							</div>
						</div>
						<div class="or">
							点击「注册」按钮，即代表你同意
							<p>
								<a href="#">《知乎机构帐号服务协议》</a>
								<a href="#">《隐私政策》</a>
							</p>
						</div>
					</div>
				</div>
				<div class="orlogin">
					<img src="/img/orgDesc.f10bf1b6.png"/>
					<p>知乎机构号是基于知乎社区生态体系的机构用户专属的知乎帐号。支持提问、回答、文章、Live 等 8 大功能，实现机构号在社区的互动沟通与分享；配以多重运营工具和营销工具，助力机构号高效成长与传播。</p>
				</div>
				<div class="orlogin01">
					<img src="/img/orgStar.fa3d98bf.png" />
					<div class="loginlist">
						<img src="/img/3ee8250e166f661a7addfbe4888dd924_l.jpg"/>
						<img src="/img/7ef1d1bf49e77c102ad42878ef187524_l.jpg"/>
						<img src="/img/8e36cd3be14532f77b4c33551b3408a2_l.jpg"/>
						<img src="/img/eca1d8fca3d0831b6184b2d6278ebbd9_l.jpg"/>
						<img src="/img/v2-00c2d0d8d93e469c0828edfd2031b60b_l.jpg"/>
						<img src="/img/v2-225214b7d237f1125c3567e73a5575fb_l.jpg"/>
						<img src="/img/v2-2dee19c54939d8d7842ec8d7999141bd_l.jpg"/>
						<img src="/img/v2-38f2611a65562b76b395004d3db5528a_l.jpg"/>
						<img src="/img/v2-426f419ce98ab2f2f3a01489eda9d706_l.jpg"/>
						<img src="/img/v2-458238a7872999ce85e05cb2cd6ed9d6_l.jpg"/>
						<img src="/img/v2-539d398e670504a955bd27fcd49bb6ae_l.jpg"/>
						<img src="/img/v2-61c365be5fd6b4f77c429ebd06bd535d_l.jpg"/>
						<img src="/img/v2-6280b352598c3124a433b50988dd342a_l.jpg"/>
						<img src="/img/v2-6ee62c9208490fb502b4ffefef7d6943_l.jpg"/>
						<img src="/img/v2-71afea3f9a42c8e6459e511307500ad0_l.jpg"/>
						<img src="/img/v2-7c6a1fb5b4c689ea3df8c7f6f4265264_l.jpg"/>
						<img src="/img/v2-82648e0e6d96c7633d361f449a8bc08b_l.jpg"/>
						<img src="/img/v2-84a15f006e22bb7a043be7b83988fc3b_l.jpg"/>
						<img src="/img/v2-84caa44f556ea7dfa81e0780698626e0_l.jpg"/>
					</div>
				</div>
			</section>
			<footer>
				<p class="text-center"><a href="#">
					知乎专栏·圆桌·发现·移动应用·联系我们·来知乎工作·注册机构号<br />
					© 2019 知乎·京 ICP 证 110745 号京公网安备 11010802010035 号·出版物经营许可证<br />
					侵权举报·网上有害信息举报专区·儿童色情信息举报专区·违法和不良信息举报：010-82716601
				</a></p>
			</footer>
		</div>
	</body>

</html>